﻿using System.Reflection;

namespace Borg
{
    public class SlotEventArgs : SystemEventArgs
    {
        private readonly SlotInfo _slotInfo;

        public SlotInfo SlotInfo
        {
            get { return _slotInfo; }
        }

        public SlotTypeInfo SlotTypeInfo
        {
            get { return _slotInfo.slotTypeInfo; }
        }

        public ExtensionInfo ExtensionInfo
        {
            get { return _slotInfo.extensionInfo; }
        }

        public ExtensionTypeInfo ExtensionTypeInfo
        {
            get { return SlotTypeInfo.ExtensionTypeInfo; }
        }

        public PluginInfo PluginInfo
        {
            get { return ExtensionTypeInfo.pluginInfo; }
        }

        public SlotEventArgs(SlotInfo slotInfo, Assembly initiator)
            : base(initiator)
        {
            _slotInfo = slotInfo;
        }
    }

    public delegate void SlotEventHandler(object sender, SlotEventArgs args);
}

